<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      xmlns:th="http://www.thymeleaf.org"
      layout:decorator="backstage/layout">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
    <title>参赛球队</title>
</head>

<body>
<div id="content" layout:fragment="content">
<script type="text/javascript" src="../../../admin/js/bootstrap-paginator.js"></script>
<script type="text/javascript" src="../../../admin/ace/js/fuelux/fuelux.spinner.min.js"></script>
<script type="text/javascript" src="../../../admin/ace/js/ace-elements.min.js"></script>
<script type="text/javascript" src="../../../admin/js/competitionTeam.js"></script>
    <div class="box-content">
        <div class="row-fluid sortable">
            <div class="box span12">
                <h3 class="row-fluid header smaller lighter blue">
                   <span class="label label-large label-pink arrowed-right">参赛球队</span>
                </h3>
                
                <form action="" method="post" id="searchForm" style="margin-left:10px;">
                	<input type="hidden" name="seasonId" th:value="${competitionGroup.seasonId}" />
		   			<select name="schoolId" id="schoolId">
		   				<option value="">全部学校</option>
		   				<option th:each="school:${schoolList}" 
		   				th:selected="${school.id == schoolId}"  
		   				th:value="${school.id}" th:text="${school.name}">
		   				</option>
		   			</select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		           	<input type="text" class="input-xlarge focused" name="teamId" th:value="${teamId}"/>
		            <input type="button" class="btn btn-info btn-inverse tpbtn search-btn" value="搜索"/>				
		        </form>
                
                <form action="/competitionTeam/insert.json" method="post" id="addForm">
                	<input type="hidden" name="groupId" th:value="${competitionGroup.id}"/>
                	<div class="row-fluid sortable ui-sortable" id="wookcontainer">
	                  	<div class="xpclass box span6">
		                      <div class="widget-header">
		                          <h2>
		                             	 可选球队
		                          </h2>
		                      </div>
		                      <div class="widget-body">
	                               <table class="table table-striped table-bordered table-hover team-table">
	                               		<tr>
	                               			<td>球队id</td>
	                               			<td>学校</td>
	                               			<td>球队名</td>
	                               		</tr>
	                               		<tr class="team-tr" th:each="team:${teamList}">
	                               			<td name="teamId" th:text="${team.id}"></td>
	                               			<td name="schoolName" th:text="${team.schoolName}"></td>
	                               			<td name="teamName" th:text="${team.name}"></td>
	                               		</tr>
	                               </table>
	                          </div>
	                     </div>
	                      
	                      <div class="xpclass box span6" style="height: 342px;">
		                      <div class="widget-header" data-original-title="测试数据">
		                          <h2>
		                             	 参赛球队
		                          </h2>
		                      </div>
	                      	<div class="widget-body">
	                               <table class="table table-striped table-bordered table-hover competition-team-table">
		                               		<tr>
		                               			<td></td>
		                               			<td>球队id</td>
		                               			<td>学校</td>
		                               			<td>球队名</td>
		                               		</tr>
		                               		<tr class="competition-team-tr" th:each="team,indexStat:${competitionTeamList}">
		                               			<td>
		                               				<span th:text="${indexStat.count}"></span>
		                               				<input type="hidden" name="number" th:value="${indexStat.count}"/>
		                               			</td>
		                               			<td>
		                               				<span name="competitionTeamId" th:text="${team.teamId}"></span>
		                               				<input type="hidden" name="teamId" th:value="${team.teamId}"/>
		                               			</td>
		                               			<td>
		                               				<span name="competitionSchoolName" th:text="${team.schoolName}"></span>
		                               			</td>
		                               			<td>
		                               				<span name="competitionTeamName" th:text="${team.teamName}"></span>
		                               			</td>
		                               		</tr>
		                               </table>
	                          </div>
	                      </div>
	                  </div>
	                  
	                  <div class="modal-footer">
	                    	<input type="submit" class="btn btn-primary btn-small" value="提交"/>
	                    	<input type="button" class="btn btn-primary btn-small rest-but" value="取消"/>
	                  </div>
                </form>
            </div><!--/span-->
        </div><!--/row-->
    </div>
</div>
</body>
</html>
